<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>dmaps: xdmaps_example_w_intr.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">dmaps
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xdmaps__example__w__intr_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xdmaps_example_w_intr.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who       Date     Changes
<hr/>

1.00    hbm    08/19/2010 First Release
1.01a nm     03/05/2012 Initializing DmaCmd structure compatible to armcc.
                        Modified base address to secure register base
                        address.
1.02a sg     05/16/2012 Some code cleanup and reorganisation of the
                  functions within the example.
1.06a kpc    04/24/2012 Modified the APIs to make this file compatible with 
                        peripheral test suite.                                                   
2.1   kpc    08/23/2014 Fixed IAR compiler reported error.
2.3   ms     01/23/17  Modified xil_printf statement in main function to
                       ensure that "Successfully ran" and "Failed" strings are
                       available in all examples. This is a fix for CR-965028.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad138547e71c03c7c9c30a0620a1569d2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdmaps__example__w__intr_8c.html#ad138547e71c03c7c9c30a0620a1569d2">XDmaPs_Example_W_Intr</a> (XScuGic *GicPtr, u16 DeviceId)</td></tr>
<tr class="memdesc:ad138547e71c03c7c9c30a0620a1569d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interrupt Example to test the DMA.  <a href="#ad138547e71c03c7c9c30a0620a1569d2">More...</a><br /></td></tr>
<tr class="separator:ad138547e71c03c7c9c30a0620a1569d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69309a8745a0da1d5f146f22fd48da9d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdmaps__example__w__intr_8c.html#a69309a8745a0da1d5f146f22fd48da9d">SetupInterruptSystem</a> (XScuGic *GicPtr, <a class="el" href="struct_x_dma_ps.html">XDmaPs</a> *DmaPtr)</td></tr>
<tr class="memdesc:a69309a8745a0da1d5f146f22fd48da9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function connects the interrupt handler of the interrupt controller to the processor.  <a href="#a69309a8745a0da1d5f146f22fd48da9d">More...</a><br /></td></tr>
<tr class="separator:a69309a8745a0da1d5f146f22fd48da9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae324d787c5677fa5cfea243c6af4b752"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdmaps__example__w__intr_8c.html#ae324d787c5677fa5cfea243c6af4b752">DmaDoneHandler</a> (unsigned int Channel, <a class="el" href="struct_x_dma_ps___cmd.html">XDmaPs_Cmd</a> *DmaCmd, void *CallbackRef)</td></tr>
<tr class="memdesc:ae324d787c5677fa5cfea243c6af4b752"><td class="mdescLeft">&#160;</td><td class="mdescRight">DmaDoneHandler.  <a href="#ae324d787c5677fa5cfea243c6af4b752">More...</a><br /></td></tr>
<tr class="separator:ae324d787c5677fa5cfea243c6af4b752"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xdmaps__example__w__intr_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main function for the DmaPs interrupt example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br /></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ae324d787c5677fa5cfea243c6af4b752"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae324d787c5677fa5cfea243c6af4b752">&#9670;&nbsp;</a></span>DmaDoneHandler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DmaDoneHandler </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>Channel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_dma_ps___cmd.html">XDmaPs_Cmd</a> *&#160;</td>
          <td class="paramname"><em>DmaCmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallbackRef</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DmaDoneHandler. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Channel</td><td>is the Channel number. </td></tr>
    <tr><td class="paramname">DmaCmd</td><td>is the Dma Command. </td></tr>
    <tr><td class="paramname">CallbackRef</td><td>is the callback reference data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="struct_x_dma_ps___cmd.html#a1002d3474d28e67143b5bc3c30f23b95">XDmaPs_Cmd::BD</a>, <a class="el" href="struct_x_dma_ps___b_d.html#a1c8be35d883d27d0f838358712c42dc4">XDmaPs_BD::DstAddr</a>, and <a class="el" href="struct_x_dma_ps___b_d.html#aa9542ecca6c6f359cc8e9c44ad2e276f">XDmaPs_BD::SrcAddr</a>.</p>

</div>
</div>
<a id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a840291bc02cba5474a4cb46a9b9566fe">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main function for the DmaPs interrupt example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS to indicate success, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="xdmaps__example__w__intr_8c.html#ad138547e71c03c7c9c30a0620a1569d2">XDmaPs_Example_W_Intr()</a>.</p>

</div>
</div>
<a id="a69309a8745a0da1d5f146f22fd48da9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69309a8745a0da1d5f146f22fd48da9d">&#9670;&nbsp;</a></span>SetupInterruptSystem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SetupInterruptSystem </td>
          <td>(</td>
          <td class="paramtype">XScuGic *&#160;</td>
          <td class="paramname"><em>GicPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_dma_ps.html">XDmaPs</a> *&#160;</td>
          <td class="paramname"><em>DmaPtr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function connects the interrupt handler of the interrupt controller to the processor. </p>
<p>This function is seperate to allow it to be customized for each application. Each processor or RTOS may require unique processing to connect the interrupt handler.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">GicPtr</td><td>is the GIC instance pointer. </td></tr>
    <tr><td class="paramname">DmaPtr</td><td>is the DMA instance pointer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a id="ad138547e71c03c7c9c30a0620a1569d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad138547e71c03c7c9c30a0620a1569d2">&#9670;&nbsp;</a></span>XDmaPs_Example_W_Intr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XDmaPs_Example_W_Intr </td>
          <td>(</td>
          <td class="paramtype">XScuGic *&#160;</td>
          <td class="paramname"><em>GicPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Interrupt Example to test the DMA. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is the Device ID of the DMA controller.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS to indicate success, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">Referenced by <a class="el" href="xdmaps__example__w__intr_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
